<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>搜索</title>
<base th:href="@{/}">
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="static/theme/index.css">
<link rel="stylesheet" href="static/css/myStyle.css" />
<link rel="stylesheet" href="static/css/reset.css" />
</head>
<body>

	<div id="searchDiv">
		<template>
			<div class="header1">
				<el-menu id="nav-bar" :default-active="'/offer'" router
					class="el-menu-demo" mode="horizontal" background-color="white"
					text-color="#222" active-text-color="#409EFF"> <el-menu-item>
				<img src="static/img/logo.png" width="100px" /> </el-menu-item>
				<el-menu-item
					v-for="(item, index) in items2" :key="index" :index="item.index"
					:id="item.class">{{ item.title }}</el-menu-item> 
						<el-col id="login-side" :span="4"> <!-- Form -->
							<el-link href="http://localhost:8082/">返回首页</el-link>
					 </el-col>
				 </el-menu>

			</div>
		</template>
		<template>
			<el-container style="background-color:#FCFCFC"> 
				<el-main> 
						<el-col :span="18" :offset="3" style="margin-top:50px">
							<el-row>
								<el-col>
									<el-col :span="2">
									    	<el-select class="input-with-select"placeholder="请选择" v-model="select">
									          <el-option label="职位" value="职位"></el-option>
									          <el-option label="公司" value="公司"></el-option>
									        </el-select>
								    </el-col>
								    <el-col :span="22">
										<el-input placeholder="请输入内容" v-model="input1"
											class="input-with-select " autosize> 
											
										<el-button @click="search(select,input1)"
											slot="append" icon="el-icon-search"></el-button>
										</el-input>
									</el-col>
								</el-col>
							</el-row>
							 <el-row style="margin:80px auto 20px auto">
								  
							 	<el-col>
							 		
									 	<el-card shadow="hover">
									 		<el-row>
										 		<el-col :span="4" class="sele-first">
							  						<span>工作区域：</span>
							  						<el-button plain v-model="option.area" class="selection-btn">{{ option.area }}</el-button>
							  					</el-col>
							  					<el-col :span="4">
							  						<span>学历要求：</span>
							  						<el-button  plain v-model="option.education">{{ option.education }}</el-button>
							  					</el-col>
							  					<el-col :span="5">
							  						<span>薪资要求：</span>
							  						<el-button  plain v-model="option.salary">{{ option.salary }}</el-button>
							  					</el-col>
							  					<el-col :span="6">
							  						<span>工作时间：</span>
							  						<el-button  plain v-model="option.jobtime">{{ option.jobtime }}</el-button>
							  						
							  					</el-col>
							  					<el-col :span="2">
							  						<el-button title="筛选搜索" @click="searchByselect" type="text" class="el-icon-search"></el-button>
							  						<el-button title="重置" @click="resetSelect" type="text" class="el-icon-delete"></el-button>
							  
							  					</el-col>
							  				</el-row>
						  					<el-divider></el-divider>
						  					<el-row>
						  						<el-col class="sele-first">
							  						<span>工作区域：</span>
							  						<el-button type="text" @click="option.area='不限'" class="selection-btn btn-text">不限</el-button>
							  						<el-button type="text" @click="option.area=i" :key="index"  v-for="(i,index) in areaList" class="selection-btn btn-text">{{ i }}</el-button>
							  						
							  					</el-col>
							  					<el-col class="sele-first">
							  						<span>学历要求：</span>
							  						<el-button type="text" @click="option.education='不限'" class="selection-btn btn-text">不限</el-button>
							  						<el-button  type="text" @click="option.education=i" :key="index" v-for="(i,index) in educationList" class="selection-btn btn-text">{{ i }}</el-button>
							  						
							  					</el-col>
							  					<el-col class="sele-first">
							  						<span>薪资要求：</span>
							  						<el-button type="text" @click="option.salary='不限'" class="selection-btn btn-text">不限</el-button>
							  						<el-button type="text" @click="option.salary=i" :key="index" v-for="(i,index) in salaryList" class="selection-btn btn-text">{{ i }}</el-button>
							  						
							  					</el-col>
							  					<el-col class="sele-first">
							  						<span>工作时间：</span>
							  						<el-button type="text" @click="option.jobtime='不限'" class="selection-btn btn-text">不限</el-button>
							  						<el-button  type="text" @click="option.jobtime=i" :key="index" v-for="(i,index) in jobtimeList" class="selection-btn btn-text">{{ i }}</el-button>
							  						
							  					</el-col>
						  					</el-row>
									 	</el-card>
							</el-row>
										
									 	<el-card shadow="never" class="infinite-list-wrapper" style="overflow-y: scroll;overflow:auto;height:700px;">
									 		<el-row>
										 		<el-col :span="20" class="list"
									      v-infinite-scroll="load"
									      infinite-scroll-disabled="disabled">
										 			<el-card shadow="never" style="margin-top:20px;font-size:15px;font-weight:300" v-for="(i,index) in searchResult" :key="index">
										 		
										 				<el-row>
											 				<el-col :span="19">
											 					<el-row>
											 						<el-col :span="12">
											 							<el-col :span="10">
											 								<el-link :underline="false" target="_blank" @click.native="getJobDetails(i.jid)">{{ i.jobname }}</el-link>
											 							</el-col>
											 							<el-col :span="8" :offset="2">
											 								<span style="color:red">{{ i.jsalary }}</span>
											 							</el-col>
											 						</el-col>
											 						<el-col :span="12"><el-link :underline="false"  @click.native="getBussiness(i.bname)" target="_blank">{{ i.bname }}</el-link></el-col>
											 					</el-row>
											 					<el-row style="margin-top:10px;">
											 						<el-col :span="12">
											 							<span>{{ i.bpro }} | </span>
											 							<span>{{ i.jtime }}</span>
											 						</el-col>
											 						<el-col :span="12">招聘人数 {{ i.jnumber }}</el-col>
											 					</el-row>
											 				</el-col>
											 				<el-col :span="5">
											 					<el-image style="width:50px ":src="i.bimg"></el-image>
											 				</el-col>
											 			</el-row>
											 			<el-divider class="divider1"></el-divider>
											 			<el-row>
											 				<el-col :span="19">{{ i.welfare }}</el-col>
											 				<el-col :span="5">发布时间：{{ i.jptime }}</el-col>
											 			</el-row>
										 			</el-card>
										 		</el-col>
									 		</el-row>
									 		<p  style="text-align:center;font-size:14px;font-weight:300;color:grey;margin:10px auto" v-if="loading"><i class="el-icon-loading"></i>加载中...</p>
									    <p style="text-align:center;font-size:14px;font-weight:300;color:grey;margin:10px auto" v-if="noMore">没有更多了</p>
									    <template>
								 	<el-backtop target=".page-component__scroll .el-scrollbar__wrap"></el-backtop>
								 </template>
									 	</el-card>
								 	</el-col>
								 
						</el-col>
					 
				</el-main> 
			</el-container>
		</template>
	</div>

	<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
	<script src="https://unpkg.com/element-ui/lib/index.js"></script>
	<script type="text/javascript"
		src="https://cdn.bootcss.com/axios/0.19.0-beta.1/axios.js"></script>
	<script type="text/javascript" src="static/js/searchPage.js"></script>
</body>
</html>